package com.cjh.controller;


import com.cjh.pojo.Emp;
import com.cjh.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author cjh
 * @since 2020-12-01
 */
@RestController
@RequestMapping("/emp")
public class EmpController {

    @Autowired
    private EmpService empService;

    @RequestMapping("/empList")
    public List<Emp> empList(){
        List<Emp> list = empService.list();
        return list;
    }

}

